package com.greenhouse.business.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.greenhouse.common.annotation.Excel;
import com.greenhouse.common.core.domain.BaseEntity;

/**
 * 设备管理对象 biz_device
 * 
 * @author greenhouse
 * @date 2021-04-12
 */
public class BizDevice extends BaseEntity {
	private static final long serialVersionUID = 1L;

	/** 设备ID */
	private Long deviceId;

	/** 产品ID */
	@Excel(name = "产品ID")
	private Long productId;

	/** 设备代码（或SN）唯一 */
	@Excel(name = "设备代码", readConverterExp = "或=SN")
	private String deviceCode;

	/** 产品名称 */
	@Excel(name = "产品名称")
	private String deviceName;

	/** 产品图片 */
	private String deviceImgUrl;

	/** 父设备ID（仅通过网关连接的设备有值） */
	private Long parentDeviceId;

	/** 设备认证配置 */
	@Excel(name = "设备认证配置")
	private String transportConf;

	/** 是否激活 */
	@Excel(name = "是否激活")
	private String activated;

	/** 设备描述 */
	@Excel(name = "设备描述")
	private String deviceDescription;

	/** 逻辑删除 */
	private String delFlag;

	/** 乐观锁 */
	private Long revision;

	/** 租户 */
	@Excel(name = "租户")
	private Long tenantId;

	public void setDeviceId(Long deviceId) {
		this.deviceId = deviceId;
	}

	public Long getDeviceId() {
		return deviceId;
	}

	public void setProductId(Long productId) {
		this.productId = productId;
	}

	public Long getProductId() {
		return productId;
	}

	public void setDeviceCode(String deviceCode) {
		this.deviceCode = deviceCode;
	}

	public String getDeviceCode() {
		return deviceCode;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceImgUrl(String deviceImgUrl) {
		this.deviceImgUrl = deviceImgUrl;
	}

	public String getDeviceImgUrl() {
		return deviceImgUrl;
	}

	public void setParentDeviceId(Long parentDeviceId) {
		this.parentDeviceId = parentDeviceId;
	}

	public Long getParentDeviceId() {
		return parentDeviceId;
	}

	public void setTransportConf(String transportConf) {
		this.transportConf = transportConf;
	}

	public String getTransportConf() {
		return transportConf;
	}

	public void setActivated(String activated) {
		this.activated = activated;
	}

	public String getActivated() {
		return activated;
	}

	public void setDeviceDescription(String deviceDescription) {
		this.deviceDescription = deviceDescription;
	}

	public String getDeviceDescription() {
		return deviceDescription;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public String getDelFlag() {
		return delFlag;
	}

	public void setRevision(Long revision) {
		this.revision = revision;
	}

	public Long getRevision() {
		return revision;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}

	public Long getTenantId() {
		return tenantId;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("deviceId", getDeviceId())
				.append("productId", getProductId()).append("deviceCode", getDeviceCode())
				.append("deviceName", getDeviceName()).append("deviceImgUrl", getDeviceImgUrl())
				.append("parentDeviceId", getParentDeviceId()).append("transportConf", getTransportConf())
				.append("activated", getActivated()).append("deviceDescription", getDeviceDescription())
				.append("delFlag", getDelFlag()).append("revision", getRevision()).append("createBy", getCreateBy())
				.append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
				.append("updateTime", getUpdateTime()).append("tenantId", getTenantId()).toString();
	}
}
